﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoodsBidAc.aspx.cs" Inherits="Bidder_GoodsBidAc"
    EnableViewState="true" %>

<%@ Register Src="../System/DbPageFlip.ascx" TagName="DbPageFlip" TagPrefix="uc2" %>
<%@ Register Src="../Common/ProtonPager.ascx" TagName="ProtonPager" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>按生产企业投标</title>
    <link href="../styles/css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            background-color: #FDFDFD;
        }
    </style>
</head>

<script language="javascript">
function chk(chkid)
{
    if(window.document.getElementById('chk_'+chkid).checked==true)
    {
         window.document.getElementById('msg').innerText+='@'+chkid;   
         window.document.getElementById('txtmsg').innerText=window.document.getElementById('msg').innerText;    
   }
    else
    {
        window.document.getElementById('msg').innerText=window.document.getElementById('msg').innerText.replace('@'+chkid,'');   
        window.document.getElementById('txtmsg').innerText=window.document.getElementById('msg').innerText;    
    }
}
function pageload()
    {
        var s=window.document.getElementById('msg').innerText;
        if(s!=null)
        {
            arraylist=s.split('@');
            for(var i=1;i<arraylist.length;i++)
            {
                if(window.document.getElementById('chk_'+arraylist[i])!=null)
                {
                   window.document.getElementById('chk_'+arraylist[i]).checked=true;
                }
            }
        }
    }
   
</script>
<%--<script language="javascript" type="text/javascript">
   
      function SetToubiao()
    {
    
            var obj=new Object;
            obj.Receiptid="";
            var i,money=0;
             var a = document.getElementsByName('chk');
             for( i = 0;i < a.length;i++)
            {
               if( a[i].checked == true)
               {
               obj.Receiptid +=a[i].value+"@";
              
               }
            }  
         if (window.confirm("您说选择的发票总金额为"+money.toFixed(2)+",\n\n是否保存?")==true)  
         {  
         window.document.getElementById('txtmsg').innerText= obj.Receiptid;
         }         
         
		    
    }
    function setRollback()
    {
    
            var obj=new Object;
            obj.Receiptid="";
            var i,money=0;
             var a = document.getElementsByName('chk');
             for( i = 0;i < a.length;i++)
            {
               if( a[i].checked == true)
               {
               obj.Receiptid +=a[i].value+"@";               
               }
            }  
         if (window.confirm("您说选择的发票总金额为"+money.toFixed(2)+",\n\n是否保存?")==true)  
         {  
          window.document.getElementById('txtmsg').innerText= obj.Receiptid;
         }         
         
		    
    }
       function SelectAll()
        {
            var i;
             var a = document.getElementsByName('chk');
             for( i = 0;i < a.length;i++)
            {
                a[i].checked = true; 
            }           
        }
        function ClearAll()
        {
            var i;
             var a = document.getElementsByName('chk');
             
             for( i = 0;i < a.length;i++)
            {
                a[i].checked = false; 
            }           
        }
        
        function CheckOthers()
        {
            var i;
            var a = document.getElementsByName('chk');
             
             for( i = 0;i < a.length;i++)
            {
            
                if(a[i].checked!=true)
                {
                    a[i].checked =true ; 
                }
                else
                {   
                    a[i].checked = false; 
                }
            }           
            
        }
    </script>--%>
<body>
    <form id="form1" runat="server">
        <div>
            <table width="98%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="4">
                        <img src="../images/intro_left.gif" width="4" height="34"></td>
                    <td class="intro_wordbg">
                        按生产企业投标</td>
                    <td background="../images/intro_bg.gif">
                        <img src="../images/intro_right.jpg" width="118" height="34"></td>
                </tr>
            </table>
            
            <table border="0">
                <tr>
                    <td align="right" class="table_td2">
                        通用名：</td>
                    <td style="height: 19px" class="table_td2">
                        <asp:TextBox ID="txtProductName" runat="server"  /></td>
                    <td align="right" class="table_td2">
                        规格：</td>
                    <td style="height: 19px" class="table_td2">
                        <asp:TextBox ID="txtOutlookc" runat="server" ></asp:TextBox></td>

                </tr>
                <tr>
                    <td class="style1" align="right">
                        药品流水号：</td>
                    <td class="style1">
                        <asp:TextBox ID="txtGoodsId" runat="server" Width="154px" ></asp:TextBox></td>
                    <td class="style1">
                        </td>
                    <td class="style1">
                        <asp:Button ID="chaxun" runat="server" Text="查询"   Width="61px"
                        CssClass="button_bg" />
                        <%--<input id="but1" type="button" class="button_bg6" value="全选" onclick="javascript:SelectAll();" />
                            <input id="but2" type="button" class="button_bg6" value="清空" onclick="javascript:ClearAll();" />
                            <input id="but3" type="button" class="button_bg6" value="反选" onclick="javascript:CheckOthers();" /></td>   --%>                      
                
                </tr>
                <tr>
                    <td class="table_td2" style="height: 20px" colspan="3">
                        <uc2:DbPageFlip ID="DbPageFlip1" runat="server" />
                        </td>
                    <td class="table_td2" colspan="1"  align="right">
                       
                        <%--<input type="submit" name="btn1" class="button_bg" value="撤销" onclick="javascript:setRollback();"
                    style="width: 60px" />    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <input type="submit" name="btn2" class="button_bg" value="投标" onclick="javascript:SetToubiao();"
                    style="width: 60px" />--%><input id="Submit1" class="button_bg" name="submitbid" style="width: 60px" type="submit"
                            value="投 标" /></td>
                </tr> 
                
                <tr>
                    <td colspan="4" style="height: 17px" class="table_td2">
                        <asp:GridView ID="GridView1" runat="server" Width="98%" AutoGenerateColumns="false"
                            OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound" OnDataBound="GridView1_DataBound"
                            CssClass='table_table' HeaderStyle-CssClass='table_title' Height="1px">
                            <Columns>
                    <asp:BoundField DataField="Goodsid" HeaderText="药品流水号" />
                    <asp:BoundField DataField="Productid" HeaderText="品目号" />
                    <asp:BoundField DataField="ProductName" HeaderText="通用名" />
                    <asp:BoundField DataField="GoodsName" HeaderText="商品名" />
                    <asp:BoundField DataField="Medicinemodel" HeaderText="剂型" />
                    <asp:BoundField DataField="Outlookc" HeaderText="规格" />
                    <asp:BoundField DataField="Factor" HeaderText="转换系数" />
                    <asp:BoundField DataField="LicenseNumber" HeaderText="批准文号" />
                    <asp:BoundField DataField="QualityLevels" HeaderText="质量层次" />
                    <asp:BoundField DataField="CompanyName" HeaderText="生产企业" />
                    <asp:BoundField DataField="UserCode" HeaderText="注册号" />
                    <asp:TemplateField HeaderText="选择投标"></asp:TemplateField>
                    <asp:BoundField DataField="num" HeaderText="是否投标" />
                            </Columns>
                            <RowStyle CssClass="table_td" />
                            <AlternatingRowStyle CssClass="table_td2" />
                            <HeaderStyle CssClass="table_title" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
 <asp:DataList ID="DlAttorney" runat="server" Width="98%" CssClass='table_table' 
                HeaderStyle-CssClass='table_title' Visible="False">
                <ItemStyle CssClass="table_td" />
                <AlternatingItemStyle CssClass="table_td2" />
                <HeaderTemplate>
                    <table width="98%">
                        <tr>
                        <td align="left" width="8%">药品流水号</td>
                   
                            <td align="left" width="8%">
                                品目号</td>
                            <td align="left" width="10%">
                                通用名</td>
                           <td align="left" width="8%">
                                商品名</td>
                            <td align="left" width="8%" >
                                剂型</td>
                                <td align="left" width="8%">
                                规格</td>
                                   <td align="left" width="8%">
                                转换系数</td>
                                   <td align="left" width="10%">
                                批准文号</td>
                                 <td align="left" width="8%">
                                质量层次</td>
                                   <td align="left" width="10%">
                                生产企业</td>
                                   <td align="left" width="4%">
                                注册号</td>
                                 <td align="left" width="4%">
                                选择</td>
                                  <td align="left" width="4%">
                                投标状态</td>
                                 
                        </tr>
                    </table>
                </HeaderTemplate>

<HeaderStyle CssClass="table_title"></HeaderStyle>
                <ItemTemplate>
                    <table width="98%">
                        <tr>
                             <td  width="8%"align="left">
                                <%# DataBinder.Eval(Container.DataItem, "Goodsid")%>
                            </td>
                            <td width="8%"align="left">
                                <%# DataBinder.Eval(Container.DataItem, "Productid")%>
                            </td>
                            <td width="10%"align="left">
                                <%# DataBinder.Eval(Container.DataItem, "ProductName")%>
                            </td>
                            <td  width="8%"align="left">
                                <%# DataBinder.Eval(Container.DataItem, "GoodsName")%>
                            </td>
                            <td width="8%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "Medicinemodel")%>
                            </td>
                            <td width="8%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "Outlookc")%>
                            </td>
                            <td width="8%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "Factor")%>
                            </td>
                            <td width="10%"align="left">
                                <%# DataBinder.Eval(Container.DataItem, "LicenseNumber")%>
                            </td>
                            <td width="8%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "QualityLevels")%>
                            </td>
                            <td width="10%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "CompanyName")%>
                            </td>
                            <td  width="4%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "UserCode")%>
                            </td>
                                                   
                            <td width="4%"><input name='chk' type='checkbox' value='<%# DataBinder.Eval(Container.DataItem, "Goodsid")%>' /></td>
                        <td width="4%" align="left">
                                <%# DataBinder.Eval(Container.DataItem, "num")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
            <input type="hidden" id="txtmsg" name="txtmsg" runat="server" />
          <asp:Label runat="server" ID="msg" ForeColor="White" Width="5px"></asp:Label>
            <input type="hidden" id="txtdatabase" name="txtdatabase" runat="server" />
            <input type="hidden" id="hid_ProductName" name="txtdatabase" runat="server" />
            <input type="hidden" id="hid_Outlookc" name="Outlookc" runat="server" />
            <input type="hidden" id="hid_ProductCode" name="ProductCode" runat="server" />
            <input type="hidden" id="hid_Bidnum" name="Bidnum" runat="server" />
            <input type="hidden" id="hid_GoodsId" name="GoodsId" runat="server" />
            
           

        </div>
    </form>
</body>
</html>
